﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Dark_Core_Library.NetworkModules.HTTP
{
    /// <summary>
    /// 通用HTTP回复
    /// </summary>
    public class UniHttpResponse<T>
    {
        /// <summary>
        /// 消息
        /// </summary>
        public string Msg { set; get; }
        /// <summary>
        /// 状态
        /// </summary>
        public UniHttpResponseStatus Status { set; get; }
        /// <summary>
        /// 数据
        /// </summary>
        public T Data { set; get; }

        private UniHttpResponse(string msg, T data, UniHttpResponseStatus status)
        {
            Msg = msg;
            Data = data;
            Status = status;
        }

        public static UniHttpResponse<T> CreateInstance(string msg, T data, UniHttpResponseStatus status)
        {
            return new UniHttpResponse<T>(msg, data, status);
        }
    }
}
